  <meta charset="utf-8" />
         
<?php
//连接数据库 
mysql_connect("localhost","root","1161105403");
   mysql_select_db("neuvideo");
   mysql_query("set names utf8");
  //使用$_POST数组获取表单中输入的数据
  connect();
$tid=$_POST["tid"];
$typename=$_POST["typename"];

 //编写SQL语句
$sql="update videotype set typename='$typename' where tid=$tid";
//执行SQL语句
$rs=mysql_query($sql);
if($rs==1){
echo "更新成功，3秒返回用户列表页";
		header("refresh:3;url='video_type.php'");}
else{
        echo "更新失败！<br/>";
    echo "<a href='video_type.php'>返回</a>";  }
?>
